const state = {
    selectGoodsArr: [], // 选择的商品
    selectGoodsIdArr: [], // 选择的商品ID
    selectedLabel: [], // 已选标签
    contrastLabel: [], // 对比修改用标签
    operateLabel: {
        deleteArr: [],
        addArr: []
    }, // 标签的操作
    selectedSpec: [], // 已选规格
    systemspecList: [], // 系统规格
    specificList: {
        goodsSpecValuesVOList: []
    }, // 已选规格具体参数
    modifySpecificList: {}, // 编辑修改之前的数据
    operateSpecTypeStr: '',
    modifySelectedSpec: [], // 商品修改前规格项
    operateSpecData: { // 编辑商品规格时候处理
        deleteBigArr: [],
        deleteSmallArr: []
    },
    editSupplyPriceData: {
        goodsSkuDetailsRespVOList: []
    }, // 供货价设置
    editSupplyType: false, // 编辑供货价状态
    contrastSpecArr: [], // 对比规格修改前的数据
    groupsBuyType: false, // 购物车刷新
    editorObject: {}, // 富文本对象
    goodsShareData: {}, // 新增修改商品的分享数据
}

const mutations = {
    SELECT_GOODS_ARR (state, selectGoodsArr) {
        state.selectGoodsArr = selectGoodsArr
    },
    SELECT_GOODSID_ARR (state, selectGoodsIdArr) {
        state.selectGoodsIdArr = selectGoodsIdArr
    },
    SELECTED_LABEL (state, selectedLabel) {
        state.selectedLabel = selectedLabel
    },
    CONTRAST_LABEL (state, contrastLabel) {
        state.contrastLabel = contrastLabel
    },
    OPERATE_LABEL (state, operateLabel) {
        state.operateLabel = operateLabel
    },
    SELECTED_SPEC (state, selectedSpec) {
        state.selectedSpec = selectedSpec
    },
    SYSTEM_SPEC_LIST (state, systemspecList) {
        state.systemspecList = systemspecList
    },
    SPECIFIC_LIST (state, specificList) {
        state.specificList = specificList
    },
    MODIFY_SPECIFIC_LIST (state, modifySpecificList) {
        state.modifySpecificList = modifySpecificList
    },
    OPERATE_SPEC_TYPE_STR (state, operateSpecTypeStr) {
        state.operateSpecTypeStr = operateSpecTypeStr
    },
    MODIFY_SELECTED_SPEC (state, modifySelectedSpec) {
        state.modifySelectedSpec = modifySelectedSpec
    },
    OPERATE_SPEC_DATA (state, operateSpecData) {
        state.operateSpecData = operateSpecData
    },
    EDIT_SUPPLY_PRICE_DATA (state, editSupplyPriceData) {
        state.editSupplyPriceData = editSupplyPriceData
    },
    EDIT_SUPPLY_TYPE (state, editSupplyType) {
        state.editSupplyType = editSupplyType
    },
    CONTRAST_SPEC_ARR (state, contrastSpecArr) {
        state.contrastSpecArr = contrastSpecArr
    },
    GROUPS_BUY_TYPE (state, groupsBuyType) {
        state.groupsBuyType = groupsBuyType
    },
    SET_EDITOR_OBJECT (state, data) {
        state.editorObject = data
    },
    GOODS_SHARE_DATA (state, data) {
        state.goodsShareData = data
    },
}

export default {
    state,
    mutations
}